import 'package:json_annotation/json_annotation.dart';

part 'NewsInfoModel.g.dart';

/*资讯信息模型*/
@JsonSerializable()
class NewsInfoModel extends Object {
  final int id;
  final int? classId;
  final int? levelTwoId;
  final String? tagId;
  final String? proCode;
  final String? market;
  final String? contractNo;
  final String? richText;
  final String? title;
  /*快讯特有*/
  final String? text;
  final String? preface;
  final String? content;
  final String? contentImg;
  final String? coverImg;
  final String? video;
  final String? annex;
  final int? commentNum;
  final int? readNum;
  final int? upvoteNum;
  final int? shareNum;
  final int? style;
  final int? isFocal;
  final int? isPush;
  final String? noComments;
  final double? topTime;
  final int? userId;
  final String? postedBy;

  /*时间戳(毫秒)*/
  final double? createTime;
  final double? updateTime;
  final int? deleted;

  /*类别名称*/
  final String? className;
  final String? levelTwoName;

  /*标签*/
  final String? tags;
  final int? upvoteStatus;
  final int? ascriptionId;
  final String? showLocation;
  final String? type;
  final Map<String, dynamic>? futuresInfoVo;
  final int? isTop;
  /*2024-06-21 13:18:02*/
  final String? topStartTime;
  final String? topEndTime;

  /*构造函数*/
  NewsInfoModel(
      this.id,
      this.classId,
      this.levelTwoId,
      this.tagId,
      this.proCode,
      this.market,
      this.contractNo,
      this.richText,
      this.title,
      this.text,
      this.preface,
      this.content,
      this.contentImg,
      this.coverImg,
      this.video,
      this.annex,
      this.commentNum,
      this.readNum,
      this.upvoteNum,
      this.shareNum,
      this.style,
      this.isFocal,
      this.isPush,
      this.noComments,
      this.topTime,
      this.userId,
      this.postedBy,
      this.createTime,
      this.updateTime,
      this.deleted,
      this.className,
      this.levelTwoName,
      this.tags,
      this.upvoteStatus,
      this.ascriptionId,
      this.showLocation,
      this.type,
      this.futuresInfoVo,
      this.isTop,
      this.topStartTime,
      this.topEndTime);

  factory NewsInfoModel.fromJson(Map<String, dynamic> json) =>
      _$NewsInfoModelFromJson(json);

  Map<String, dynamic> toJson() => _$NewsInfoModelToJson(this);
}
